<?php




require 'database.php';

$base=new Db;

$type=$_GET['type'];

$data=[];

if($type=="list"){
    $data=[
        "rows"=>[
            [
                "name"=>"list.html"
            ],   
            [
                "name"=>"list_honor.html"
            ],
            [
                "name"=>"list_image.html"
            ],
            [
                "name"=>"list_job.html"
            ],
            [
                "name"=>"list_product.html"
            ]
        ],
        "total"=>5,
        "code"=>200,
        "data"=>[
            [
                "name"=>"list.html"
            ],   
            [
                "name"=>"list_honor.html"
            ],
            [
                "name"=>"list_image.html"
            ],
            [
                "name"=>"list_job.html"
            ],
            [
                "name"=>"list_product.html"
            ]   
        ]
    ];
}elseif($type=="category"){
    $data=[
        "rows"=>[
            [
                "name"=>"category.html"
            ],   
            [
                "name"=>"category_product.html"
            ]
        ],
        "total"=>2,
        "code"=>200,
        "data"=>[
            [
                "name"=>"category.html"
            ],   
            [
                "name"=>"category_product.html"
            ]
        ]
    ];
}elseif($type=="page"){
    $data=[
        "rows"=>[
            [
                "name"=>"page.html"
            ],   
            [
                "name"=>"page_contact.html"
            ],
            [
                "name"=>"page_guestbook.html"
            ]
        ],
        "total"=>3,
        "code"=>200,
        "data"=>[
            [
                "name"=>"page.html"
            ],   
            [
                "name"=>"page_contact.html"
            ],
            [
                "name"=>"page_guestbook.html"
            ]
        ]
    ];
}elseif($type=="show"){
    $data=[
        "rows"=>[
            [
                "name"=>"show.html"
            ]
        ],
        "total"=>1,
        "code"=>200,
        "data"=>[
            [
                "name"=>"show.html"
            ]
        ]
    ];
}


return json($data);

